import request from '@/utils/request'

/**
 * 获取收费标准
 */
export function apiGetChargeList() {
    return request.get('spec/list')
}

/**
 * 删除收费标准
 * @param id  收费标准唯一ID
 * @returns 
 */
export function apiSetDeleCharge(parma) {
    return request.post(`/spec/delete?id=${parma.id}`)
}

//添加数据
export function apiSetAddCharge(parma) {
    return request.post('/spec/add', {
        ex_desc: parma.ex_desc,
        amount: parma.amount
    })
}

/**
 * 
 * @param  id 收费标准唯一ID
 * @param  ex_desc 收费说明
 * @param  amount  收费金额
 * @returns 
 */
export function apiSetUpCharge(parma) {
    return request.post(`/spec/edit?id=${parma.id}`, {
        ex_desc: parma.ex_desc,
        amount: parma.amount
    })
}